/*
 *    Copyright (c) 2018-2025, cloud All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: cloud
 */

package com.fuyao.cloud.asset.sau.service;

import cn.hutool.core.lang.tree.Tree;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuyao.cloud.asset.entity.AssetSau;
import com.fuyao.cloud.asset.vo.SauImportVO;
import com.fuyao.cloud.asset.vo.SauPageVO;
import com.fuyao.cloud.common.core.util.R;
import org.springframework.validation.BindingResult;

import java.util.List;

/**
 * 标准资产型号
 *
 * @author liyue
 * @date 2021-11-17 17:29:51
 */
public interface AssetSauService extends IService<AssetSau> {

	/**
	 * 查询资产型号集合
	 *
	 * @param query 查询构造器
	 * @return 资产型号集合
	 */
	List listSau(QueryWrapper<AssetSau> query);

	/**
	 * 资产型号导入
	 *
	 * @param excelVOList   导入列表
	 * @param bindingResult 绑定返回信息
	 * @return 导入信息。
	 */
	R importSau(List<SauImportVO> excelVOList, BindingResult bindingResult);

	/**
	 * 查询型号标准树
	 *
	 * @param query 查询构造器
	 * @return 型号标准树
	 */
	List<Tree<Long>> selectTree(QueryWrapper<AssetSau> query);

	/**
	 * 资产标准型号视图
	 *
	 * @param page  分页对象
	 * @param query 查询构造器
	 * @return page分页对象。
	 */
	IPage sauPage(Page page, QueryWrapper<AssetSau> query,AssetSau fyAssetSau);

	/**
	 * 查询标准型号相关信息
	 * @param id id
	 * @return 标准型号
	 */
	SauPageVO getSauById(Long id);
}
